// C1 E20 Answer book edition.
// Core: Learn what is a tab! Search in my evernote.

#include <stdio.h>

#define GAP 8

int main()
{
    int c;
    int nb, pos;

    nb = 0;
    pos = 1;

    while ((c = getchar()) != EOF)
    {
        if (c == '\t')
        {
            nb = GAP - (pos - 1) % GAP;
            while (nb > 0)
            {
                putchar('*');
                ++pos;
                --nb;
            }
        }
        else if (c == '\n')
            putchar(c), pos = 1;
        // for (i = 0; i < (4 + GAP + 4); i++)
        //     putchar(' ');
        else
            putchar(c), ++pos;
    }

    return 0;
}